<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>

<link rel="stylesheet" href="<s:url value="/assets/css/select2.css"></s:url>"/>
<div class="col-xs-12">
    <form:form commandName="summaryFilter" cssClass="form-horizontal" role="form">

        <div class="form-group">
            <label class="col-sm-1 control-label no-padding-right" for="sysId">申报单号</label>
            <div class="col-sm-5">
                <input type="text" name="sysId" id="sysId" placeholder="申报单号" value="${summaryFilter.sysId}"
                       class="form-control required">
            </div>

            <label class="col-sm-1 control-label no-padding-right"
                   for="projectClass">项目类别</label>
            <div class="col-sm-5">
                    <%-- <input type="text" name="projectStage" id="projectStage" placeholder="请选择项目类别" value="${summaryFilter.projectStage}" class="form-control "> --%>
                <select name="projectClass" class="form-control required" style="width: 100%"
                        data-placeholder="请选择项目类别" id="projectClass">
                    <option value="${summaryFilter.projectClass }">${summaryFilter.projectClass }</option>
                    <option value="大项目、好项目">大项目、好项目</option>
                    <option value="一般项目">一般项目</option>
                </select>
            </div>

        </div>
        <div class="form-group">
            <label class="col-sm-1 control-label no-padding-right" for="teamClass">组别</label>

            <div class="col-sm-5">
                <select name="teamId" class="form-control required" style="width: 100%"
                        data-placeholder="组别" id="teamClassId" onchange="findtwoClass()">
                    <option value="${summaryFilter.teamId }">${summaryFilter.teamClass }</option>
                    <c:forEach items="${teamClass}" var="teamClass">
                        <option value="${teamClass.teamId }">${teamClass.teamClass }</option>
                    </c:forEach>
                </select>
            </div>
            <div>
                <label class="col-sm-1 control-label no-padding-right"
                       for="teamClass">小分队</label>
                <div class="col-sm-5">
                    <select name="teamName" class="form-control required" style="width: 100%"
                            data-placeholder="请选择分类" id="teamname">
                        <option value="${summaryFilter.teamName }">${summaryFilter.teamName }</option>
                    </select>
                </div>
            </div>
        </div>


        <div class="form-group">
            <label class="col-sm-1 control-label no-padding-right" for="projectName">项目名称</label>
            <div class="col-sm-5">
                <input type="text" name="projectName" id="projectName" placeholder="项目名称"
                       value="${summaryFilter.projectName}" class="form-control required">
            </div>

            <label class="col-sm-1 control-label no-padding-right" for=investorName>投资方名</label>
            <div class="col-sm-5">
                <input type="text" name="investorName" id="investorName" placeholder="请输入投资方名称"
                       value="${summaryFilter.investorName}" class="form-control required">
            </div>
        </div>


        <div class="form-group">
            <label class="col-sm-1 control-label no-padding-right"
                   for="industrialClassfly">产业分类</label>
            <div class="col-sm-5">
                    <%-- 			<input type="text" name="industrialClassfly" id="industrialClassfly" placeholder="产业分类" value="${summaryFilter.industrialClassfly}" class="form-control "> --%>
                <select name="industrialClassfly" class="form-control required"
                        style="width: 100%" data-placeholder="请选择产业分类"
                        id="industrialClassfly">
                    <option value="${summaryFilter.industrialClassfly }">${summaryFilter.industrialClassfly }</option>
                    <option value="一产">一产</option>
                    <option value="二产">二产</option>
                    <option value="三产">三产</option>
                </select>
            </div>

            <label class="col-sm-1 control-label no-padding-right"
                   for=industrialConcrete>具体分类</label>
            <div class="col-sm-5">
                    <%-- <input type="text" name="industrialConcrete" id="industrialConcrete" placeholder="填写农林水、工业、制造业、能源、大数据物联网、商贸、交通、城市基础设施、旅游、金融业、社会公共事业、服务业" value="${summaryFilter.industrialConcrete}" class="form-control "> --%>
                <select name="industrialConcrete" class="form-control required"
                        style="width: 100%" data-placeholder="请选择具体分类"
                        id="industrialConcrete">
                    <option value="${summaryFilter.industrialConcrete }">${summaryFilter.industrialConcrete }</option>

                    <option value="农林牧渔业">农林牧渔业</option>
                    <option value="工业">工业</option>
                    <option value="建筑业">建筑业</option>
                    <option value="服务业">服务业</option>
                    <option value="金融">金融</option>
                    <option value="批发和零售业">批发和零售业</option>
                    <option value="仓储和邮政业">仓储和邮政业</option>
                    <option value="软件和信息技术">软件和信息技术</option>
                    <option value="社会公共事业">社会公共事业</option>
                    <option value="物联网">物联网</option>
                    <option value="大数据">大数据</option>
                    <option value="旅游">旅游</option>
                    <option value="文教">文教</option>
                    <option value="卫计">卫计</option>
                    <option value="其他">其他</option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-1 control-label no-padding-right"
                   for="totalInver">合计金额</label>
            <div class="col-sm-5">
                <input type="text" name="totalInver" id="totalInver" placeholder="请输入金额数"
                       value="${summaryFilter.totalInver}" class="form-control required">
            </div>
            <label class="col-sm-1 control-label no-padding-right"
                   for="isaudit">审核状态</label>
            <div class="col-sm-5">
                    <%-- 			<input type="text" name="industrialClassfly" id="industrialClassfly" placeholder="产业分类" value="${summaryFilter.industrialClassfly}" class="form-control "> --%>
                <select name="isaudit" class="form-control required"
                        style="width: 100%" data-placeholder="请选择审核状态"
                        id="isaudit">
                    <option value="${summaryFilter.isaudit }">${summaryFilter.isaudit }</option>
                    <option value="1">审核通过</option>
                    <option value="2">作废</option>
                    <option value="3">回退</option>
                    <option value="0">未审核</option>
                </select>
            </div>

        </div>

        <div class="form-group">
            <label class="col-sm-1 control-label no-padding-right"
                   for="projectStage">项目阶段</label>
            <div class="col-sm-5">
                <select name="projectStage" class="form-control required"
                        style="width: 100%" data-placeholder="请选择项目阶段"
                        id="projectStage">
                    <option value="${summaryFilter.projectStage }">${summaryFilter.projectStage }</option>
                    <option value="已备案">已备案</option>
                    <option value="已注册">已注册</option>
                    <option value="在谈项目">在谈项目</option>
                    <option value="意向项目">意向项目</option>
                    <option value="评审项目">评审项目</option>
                    <option value="签约项目">签约项目</option>
                    <option value="审批项目">审批项目</option>
                    <option value="落地项目">落地项目</option>
                    <option value="在建项目">在建项目</option>
                    <option value="投产项目">投产项目</option>
                </select>
            </div>
            <label class="col-sm-1 control-label no-padding-right"
                   for="projectStage">场地使用方式</label>
            <div class="col-sm-5">
                <select name="groundused" class="form-control required"
                        style="width: 100%" data-placeholder=""
                >
                    <option></option>
                    <option value="征地">征地</option>
                    <option value="租赁土地">租赁土地</option>
                    <option value="租赁楼宇">租赁楼宇</option>

                </select>
            </div>
        </div>


        <div class="form-group">
            <label class="col-sm-1 control-label no-padding-right"
                   for="datatime">年份</label>
            <div class="col-sm-5">
                <select name="datatime" class="form-control required"
                        style="width: 100%" data-placeholder="请选择项目阶段" onchange="showreport()"
                        id="datatime">
                    <option></option>
                    <option value="2018">2018</option>
                    <option value="2017">2017</option>
                    <option value="2016">2016</option>

                </select>

            </div>

            <label class="col-sm-1 control-label no-padding-right">首申日期</label>
            <div class="col-sm-5">
                <div class="row">
                    <div class="col-xs-8 col-sm-12">
                        <div class="input-group">
                            <input type="text" name="firstReportDate" class="form-control date-picker" readonly/>
                            <span class="input-group-addon">
										<i class="fa fa-calendar bigger-110"></i>
									</span>
                        </div>
                    </div>
                </div>
            </div>

                <%--<input type="text" name="taxproof" id="taxproof"
                       value="${summaryFilter.taxproof}" class="form-control "
                       style="display: none"/>--%>
                <%--<input type="text" name="isaudit" id="isaudit"--%>
                <%--value="${summaryFilter.isaudit}" class="form-control " style="display: none"--%>
                <%--/>--%>
                <%--<input type="text" name="teamClass" id="teamClass"
                       value="${summaryFilter.teamClass}" class="form-control " style="display: none"
                />--%>
                <%-- <input type="text" name="datatime" id="datatime"
                        value="${summaryFilter.datatime}" class="form-control " style="display: none"
                 />--%>
        </div>

        <div class="form-group">
            <label class="col-sm-1 control-label no-padding-right">更新日期</label>
            <div class="col-sm-5">
                <div class="row">
                    <div class="col-xs-8 col-sm-12">
                        <div class="input-group">
                            <input type="text" name="updDate" class="form-control date-upd" readonly/>
                            <span class="input-group-addon">
										<i class="fa fa-calendar bigger-110"></i>
									</span>
                        </div>
                    </div>
                </div>
            </div>

            <label class="col-sm-1 control-label no-padding-right">市考评状态</label>
            <div class="col-sm-5">
                <select name="cityEvaluation" class="form-control required"
                        style="width: 100%"
                        id="cityEvaluation">
                    <option></option>
                    <option value="1">已考评</option>
                    <option value="0">未考评</option>
                </select>
                    <%--<div class="col-sm-5">--%>
                    <%--<div class="row">--%>
                    <%--<div class="col-xs-8 col-sm-12">--%>
                    <%--<div class="input-group">--%>
                    <%--<input type="text" name="reportUrban"  class="form-control date-picker" readonly  />--%>
                    <%--<span class="input-group-addon">--%>
                    <%--<i class="fa fa-calendar bigger-110"></i>--%>
                    <%--</span>--%>
                    <%--</div>--%>
                    <%--</div>--%>
                    <%--</div>--%>
                    <%--</div>--%>

            </div>
        </div>


        <div class="form-group">
            <label class="col-sm-1 control-label no-padding-right">市考评时间</label>
            <div class="col-sm-5">
                <div class="row">
                    <div class="col-xs-8 col-sm-12">
                        <div class="input-group">
                            <input type="text" name="cityEvaluationDate" class="form-control city-picker" readonly/>
                            <span class="input-group-addon">
										<i class="fa fa-calendar bigger-110"></i>
									</span>
                        </div>
                    </div>
                </div>
            </div>

            <label class="col-sm-1 control-label no-padding-right" id="report-label"
                   style="display: none">2017年考评阶段</label>
            <div class="col-sm-5" id="report-div" style="display: none">
                <select name="reported" class="form-control required"
                        style="width: 100%"
                        id="find-reported">
                    <option></option>
                    <option value="第一阶段">第一阶段</option>
                    <option value="第二阶段">第二阶段</option>
                    <option value="第三阶段">第三阶段</option>
                </select>
            </div>
        </div>


    </form:form>
</div>
<script type="text/javascript">
    function findtwoClass() {
        var teamID = $("#teamClassId").val();
        var teamClassname = $("#teamClassId").find("option:selected").text();
        $("#teamClass").attr("value", teamClassname);
//console.log(teamID);
//alert(teamID);
        var teamcla = {
            "teamId": teamID
        };

        $.ajax({
            url: "/chart/show/getTeamclassNames",
            dataType: "json", //返回数据形式为json
            type: "POST",
            contentType: 'application/json;charset=UTF-8',
            data: JSON.stringify(teamcla),
            success: function (data) {
                $("#teamname option").remove();
                $("#teamname").append(" <option value=''>请选择</option>");
                for (var i = 0; i < data.data.length; i++) {
                    var teamid = data.data[i].teamId;
                    var teamname = data.data[i].teamName;
                    $("#teamname").append(
                        "<option value='" + teamname + "'>" + teamname
                        + "</option>");
//console.log(teamname);
                }
            }
        });

    }

    jQuery(function ($) {
        $('.date-picker').datepicker({
            inline: true,
            format: "yyyymmdd",
            autoclose: true,
            todayHighlight: true,
            language: 'cn'
        })
        //show datepicker when clicking on the icon
            .next().on(ace.click_event, function () {
            $(this).prev().focus();
        });
    });

    jQuery(function ($) {
        $('.date-upd').datepicker({
            inline: true,
            format: "yyyy-mm-dd",
            autoclose: true,
            todayHighlight: true,
            language: 'cn'
        })
        //show datepicker when clicking on the icon
            .next().on(ace.click_event, function () {
            $(this).prev().focus();
        });
    });


    jQuery(function ($) {
        $('.city-picker').datepicker({
            inline: true,
            format: "yyyymm",
            autoclose: true,
            todayHighlight: true,
            startView: 'months', //开始视图层，为月视图层
            maxViewMode: 'years', //最大视图层，为年视图层
            minViewMode: 'months', //最小视图层，为月视图层
            language: 'cn'
        })
        //show datepicker when clicking on the icon
            .next().on(ace.click_event, function () {
            $(this).prev().focus();
        });
    });

    function showreport() {
        var yeartime = $("#datatime").val();
        if (yeartime == "2017") {
            $("#report-label").show();
            $("#report-div").show();
        }
        else {
            $("#report-label").hide();
            $("#report-div").hide();
            $("#find-reported").val("");
        }
    }

</script>